import React from 'react';
import ReactDOM from 'react-dom';
import { Route } from 'react-router-dom';
import TopMenu from './TopMenu/TopMenu';
import './index.less';
import BlogBody from './BlogBody/BlogBody';
import {BrowserRouter} from 'react-router-dom';
import MyEditor from "./MyEditor/MyEditor";

ReactDOM.render(
    <BrowserRouter>
        <div>
            {/*<HashRouter>*/}
            {/*    <Route path="/" component={TopMenu}>*/}
            {/*        <IndexRoute path={'/'} component={BlogBody}/>*/}
            {/*        <Route path={'/main'} component={BlogBody}/>*/}
            {/*        <Route path={'/write'} component={MyEditor} />*/}
            {/*    </Route>*/}
            {/*</HashRouter>*/}
            <TopMenu />
            <Route path="/" component={BlogBody} exact />
            <Route path={'/main'} component={BlogBody}/>
             <Route path={'/write'} component={MyEditor} />
        </div>
    </BrowserRouter>
    ,
    document.getElementById('root')
);